<template>
  <div class="communitys">
    <van-nav-bar title="活动详情" left-arrow @click-left="onClickLeft" class="bar" />
    <div class="community_party" @click="community(item.boyu_cid)" v-for="(item,index) of boyu_community" :key="index">
      <div class="top">
        <img :src="item.boyu_cpicture" />
        <div class="cents">
          <span v-html="item.boyu_ctitle"></span>
          <p v-html="item.boyu_ctime"></p>
          <p v-html="item.boyu_cplace"></p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      boyu_community: []
    };
  },
  mounted() {
    this.axios.get("/community").then(res => {
      this.boyu_community = res.data.results;
    });
  },
  methods: {
    onClickLeft() {
      this.$router.push("/faxian");
    },
    community(kw) {
      this.$router.push({
        path: "/party",
        query: {
          cid: kw
        }
      });
    }
  }
};
</script>
<style scoped>
.bar {
  width: 100%;
  height: 50px;
  position: fixed;
  top: 0;
  left: 0;
}
.top {
  margin-top: 50px;
}
.cents {
  padding-left: 15px;
  padding-right: 15px;
}
.cents > span {
  font-weight: 600;
}
.cents > p {
  font-size: 14px;
  color: #888;
  /* padding-top:-10px; */
  margin-top:-10px;
}
.top>img{
  height:230px;
}
</style>
